using System.Web.Mvc;

namespace ZQNB.Web.Controllers
{
    public class CmsController : Controller
    {
        public CmsController()
        {
            
        }

        public ActionResult Page(string site, string pageUri)
        {
            string pageUrl = string.Format("~/Views/Cms/{0}/{1}.cshtml", site, pageUri);
            string mapPath = Server.MapPath(pageUrl);
            if (!System.IO.File.Exists(mapPath))
            {
                return View("404");
            }
            return View(pageUrl);
        }
    }
}